<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
         xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
         xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>
<h1>
    首页 hello Shiro!
</h1>
<h5>有什么权限就显示什么按钮</h5>
<a th:href="@{/toLogin}" shiro:notAuthenticated="">去登录</a>
<hr>
<div shiro:hasPermission="user:add">
    <a th:href="@{/add}">添加</a>
</div>
||
<div shiro:hasPermission="user:update">
    <a th:href="@{/update}">更新</a>
</div>

<div >
    <a th:href="@{/logout}">注销</a>
</div>

<p th:text="${msg}"></p>


</body>
</html>
